package com.bwie.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * @BelongsProject: E-Commerce-Month-01
 * @BelongsPackage: com.bwie.vo
 * @Author: asus
 * @CreateTime: 2025-10-16  10:39
 * @Description:
 * @Version: 1.0
 */
@Data
@ApiModel("用户账户密码实体类")
public class UserPwdVo implements Serializable {

    //账户
    @NotBlank(message = "账户为必填项，请输入账户！")
    @Size(min = 8,message = "账户长度不能小于8位")
    @ApiModelProperty("用户账户")
    private String account;

    //密码
    @NotBlank(message = "密码为必填项，请输入密码！")
    @Pattern(
            regexp = "^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9]{6,}$",
            message = "密码长度不小于6位，且密码必须包含字母和数字"
    )
    @ApiModelProperty("用户密码")
    private String password;


    //邮箱
    @ApiModelProperty("用户邮箱")
    private String email;


}
